package com.tao.system.domain.question.dto;

import com.tao.common.creo.domain.BaseEntity;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class QuestionAddDTO extends BaseEntity {
    @NotNull(message = "标题不能为空")
    private String title;
    @NotNull(message = "题目难度不能为空")
    @Max(value = 3, message = "难度不合法, 题目难度 1简单 2中等 3困难")
    @Min(value = 1, message = "难度不合法, 题目难度 1简单 2中等 3困难")
    private Integer difficulty;
    @NotNull(message = "时间限制不能为空")
    private Integer timeLimit;
    @NotNull(message = "空间限制不能为空")
    private Integer spaceLimit;
    @NotNull(message = "题目正文不能为空")
    private String content;
    @NotNull(message = "测试用例不能为空")
    private String questionCase;
    @NotNull(message = "默认代码不能为空")

    private String defaultCode;
    @NotNull(message = "main函数不能为空")

    private String mainFuc;

}
